Using the Facility Import/Export Utility

When you start the Facility Import/Export utility, the utility dialog box appears. Use this interface to specify parameters to export or import facility attribute .csv files, and to view the results.

See Facility Attributes CSV File for more information about the CSV files and the facility attributes they contain.

Facility Import/Export Utility

Facility Import/Export Utility

Exporting Facility Attributes

Use Export Facility Attributes to save the specified facility or current value records to a .specified csv file. If the .csv file specified already exists, it will be replaced (overwritten) when the export is run. See Viewing a Facility Attribute CSV File with Excel.

To Export Facility Attributes

  1. Open the Facility Import/Export utility.
  2. In the CygNet Facility Import/Export Utility dialog box, select a Facility or Current Value Service. Either type the service name into the text box or click ... to access the Select Service dialog box and select a Site and Service combination.
  3. In the Export Facility Attributes box, specify a File name to which to export the data. Either type the file name into the text box (including the .csv extension) or click to access the Save As dialog box and browse to a directory location for the file. Browsing will insert a default file name (yoursite.service_facattrs.csv), which you can overwrite with another name if desired. Once the location and name are as desired, click Save. The directory location appears in the File text box.

    Note: If you do not specify a path, the file will be created in the same directory from which the utility is run (typically CygNet\*).

  4. Click Export to CSV to export the file.
  5. When the export is complete, a message box will be displayed, showing the number of records exported, and the file location. Click OK.
  6. Export results are shown in the status window (bottom pane). Optionally, to clear this pane in preparation for another action, click Clear Messages. See Status Window for more information about messages displayed in this pane.
  7. Click Close when all export actions are complete.

Importing Facility Attributes

Use Import Facility Attributes to upload facility attribute values from a specified .csv file to the selected FAC. Before uploading the file, the utility checks each line for validity. There are also several characteristics of import files to consider before proceeding.

Considerations Before Importing a Facility Attribute CSV File

Consider the following characteristics of .csv import files before importing facility attributes.

To Import Facility Attributes

  1. Optionally, stop the Facility Service and backup your .dat.edb file. This step is not required but is highly recommended.
  2. Open the Facility Import/Export utility.
  3. In the CygNet Facility Import/Export Utility dialog box, select a Facility or Current Value Service. Either type the service name into the text box or click ... to access the Select Service dialog box and select a Site and Service combination.
  4. In the Import Facility Attributes box, specify the File name containing the data to import. Either type the name of the file that contains the facility attributes into the text box (including the .csv extension) or click to access the Open dialog box and browse to a directory location. Browsing will insert a default file name (.yourservice_facattrs.csv), which you can overwrite with another name if desired. Click Open. The directory location appears in the File text box.
  5. Optionally select/clear the check box to Skip line if any column exceeds max character count. If the check box is cleared, when a value in the .csv file is longer than is allowed for the attribute, the value will be truncated. If the Skip line if... check box is selected, the row will be skipped instead of truncated (the entire row is skipped, not just the value(s) that exceed the character count).
  6. Click Import from CSV, then Yes to verify the location, and then OK to import the file.
  7. When the import is complete, a message box will be displayed showing the results of the import. Click OK.
  8. Import results are shown in the status window (bottom pane). Optionally, to clear this pane in preparation for another action, click Clear Messages. See Status Window for more information about messages displayed in this pane.
  9. Click Close when all import actions are complete.

Viewing Import/Export Results

When the import/export action is complete, a box showing the number of records affected will be displayed. It shows the number of records added, updated, skipped, and an error count. "Skipped" means no updates were made because the attribute information in the .csv file matched the information in the facility record.

Viewing and Editing a Facility Attribute CSV File with Excel

The Excel default Number format is "General", which uses scientific notation for numbers of twelve or more digits. When using the Export to CSV function on the Facility Import/Export utility, opening the .csv file with Excel can cause a change of format and/or a loss of numeric characters in strings longer than twelve characters. This can cause issues if the Import from CSV function is then used to upload that .csv file to CygNet. For .csv files containing numbers of twelve or more digits, perform the following before importing .csv export files to the selected FAC.

To Reformat a CSV File Containing Numbers of Twelve or More Digits

  1. Open a blank Excel worksheet and select the Data tab.
  2. Click From Text to access the Import Text File dialog box.
  3. Select the facility attribute .csv file desired and click Import. The Text Import Wizard dialog box opens.
  4. In the Original data type section, select Delimited and click Next.
  5. In the Delimiters section, check Tab and Comma and click Next.
  6. In the Data preview area, select the numeric string column(s) to be formatted and then select Text in the Column data format section.
  7. Click Finish. The Import Data dialog box opens.
  8. Click OK.

DDS-Owned Facilities

The Facility Service (FAC) stores facilities and their attributes, however not all facilities are "owned" by the FAC service. Facilities that represent devices (remote devices, import/export devices, or communication devices) are "owned" by the Device Definition Service (DDS). All other facilities are owned by the FAC.

If a facility’s "category" attribute value is one of the following, the facility is owned by the DDS.

When using the CygNet Facility Import/Export utility (FacLoad.exe), be aware that facilities that are owned by the DDS have certain attributes that are passed to the FAC from the DDS. That means the values of these attributes must be edited in the DDS. These attributes are: site, service, id, is_active, and desc. (The category attribute is generated by the FAC service; DO NOT change it.) All other attributes are owned by the FAC. See Facility Attributes CSV File for more information about facility attributes contained in the CSV files.

When you export facility attribute values using the CygNet Facility Import/Export utility (FacLoad.exe), the .csv file will include the attributes passed to the FAC from the DDS for DDS-owned facilities. Although you can edit the values in the .csv file, they will be ignored during the import since the CygNet Facility Import/Export utility (FacLoad.exe) only changes data in the FAC. To make bulk changes to device information, use the CygNet DDS Import/Export Utility.

Back to top